
function gpsDisplay(){
	
}
gpsDisplay.prototype.show = function(oGPS, oUnits){
try {

	//$('time').innerHTML = "0:00:00";
	
	$('pace1').innerHTML = oGPS.getPace(oUnits);
	$('speed1').innerHTML = oGPS.getSpeed(oUnits);
	$('distance1').innerHTML = oGPS.getDistance();
	$('avespeed1').innerHTML = oGPS.getAvgSpeed();
	$('latitude').innerHTML = oGPS.getLat();
	$('longitude').innerHTML = oGPS.getLon();
	$('avespeed').innerHTML = oGPS.getAvgSpeed(); //Total Dist/Total Time
	$('avgPace').innerHTML = oGPS.getAvgPace(oUnits);
	$('speed').innerHTML = oGPS.getSpeed(oUnits);
	//$('speed2').innerHTML = "0";//[d/t] based
	//$('pace').innerHTML = "0";//velocity based
	//$('speed3').innerHTML = "0";//	Mile Pace(m/Mi)[d/t] based
	$('distance').innerHTML = oGPS.getDistance();
	$('distance2').innerHTML = oGPS.getVertDistance();//Vertical Travel(feet)[V]
	$('altitude').innerHTML = oGPS.getAltitude(oUnits);
	$('horiz').innerHTML = oGPS.horizAccuracy();
	$('vert').innerHTML = oGPS.vertAccuracy();
	$('refreshes').innerHTML = oGPS.GPSCount;
} 
catch (e) {
	$('error_area-to-update').innerHTML = " :display<br>";
	$('error_area-to-update').innerHTML += e.message;
	
}
	
	
}
gpsDisplay.prototype.setGPSDisplay = function(incomingNode, incomingUnits,count){
	$('latitude').innerHTML = 	incomingNode.latitude.toFixed(6);
	$('longitude').innerHTML = 	incomingNode.longitude.toFixed(6);
	$('speed').innerHTML = 		(incomingNode.velocity * incomingUnits).toFixed(2);
	$('speed1').innerHTML = 	(incomingNode.velocity * incomingUnits).toFixed(2);
	$('altitude').innerHTML = 	(incomingNode.altitude * incomingUnits).toFixed(2);
	$('horiz').innerHTML = 		incomingNode.horizAccFt;
	$('vert').innerHTML = 		incomingNode.vertAccFt;	
	if ((incomingNode.smoothVelocity * 2.237) >= .75){ //change Meters per sec to MPH because that is what I am used to
			$('speed2').innerHTML = (incomingNode.smoothVelocity * incomingUnits).toFixed(2);
			$('speed3').innerHTML = toMilePaceText((incomingNode.smoothVelocity * 2.237).toFixed(2));
	}
	else{
		$('speed2').innerHTML = "N/A";					
		$('speed3').innerHTML = "N/A";
	}	
	if (incomingNode.velocityMPH >= .75) {
		$('pace').innerHTML = incomingNode.milePaceText;//(currentNode.smoothVelocity * this.velocityUnit).toFixed(2);					
		$('pace1').innerHTML = toMilePaceText((incomingNode.smoothVelocity * 2.237).toFixed(2));//to miles only
	}
	else {
		$('pace').innerHTML = "N/A";
		$('pace1').innerHTML = "N/A";
	}
	$('distance').innerHTML = incomingNode.travelMeasured.toFixed(2);
	if (typeof incomingNode.averageSpeed == "undefined") {
		$('avespeed').innerHTML = "N/A";
	}else{
		$('avespeed').innerHTML = incomingNode.averageSpeed.toFixed(2);
	}
	$('avespeed').innerHTML = incomingNode.averageSpeed.toFixed(2);
	$('avgPace').innerHTML = toMilePaceText((incomingNode.averageSpeed * 2.237).toFixed(2));
	$('distance1').innerHTML = incomingNode.travelMeasured.toFixed(2);
	$('distance2').innerHTML = incomingNode.travelVertical.toFixed(2);
	$('avespeed1').innerHTML = incomingNode.averageSpeed.toFixed(2);
	$('refreshes').innerHTML = count;
}
gpsDisplay.prototype.resetGPSDisplay = function(){
	$('speed1').innerHTML = "0";
	//$('speed2').innerHTML = "0";
	//$('speed3').innerHTML = "0";
	//$('pace').innerHTML = "0";
	$('pace1').innerHTML = "0";
	$('avgPace').innerHTML = "0";
	$('avespeed1').innerHTML = "0.00";
	$('avespeed').innerHTML = "0";
	$('distance1').innerHTML = "0.00";
	$('latitude').innerHTML = "";
	$('longitude').innerHTML = "";
	$('speed').innerHTML = "0";
	$('distance').innerHTML = "0";
	$('distance1').innerHTML = "0";
	$('distance2').innerHTML = "0";
	$('altitude').innerHTML = "";
	$('horiz').innerHTML = "";
	$('vert').innerHTML = "";
	$('refreshes').innerHTML = "0";
	$('time').innerHTML = "0:00:00"
}

